UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Fd4oKynl0Q+S2PXkWd7oMArQFniwQu/8lLhbx1Mwh6A=' 
WHERE 
  key_id = 'd0c690377b7dd729e690f6f462954797aa2336a80c68b9eb865787e0b152b51e' 
  AND (
    token = 'Fd4oKynl0Q+S2PXkWd7oMArQFniwQu/8lLhbx1Mwh6A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022