UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'U5PhSUVn95oawaTTzYTuvrOvdNoTcKCisqh9x/I5uqk=' 
WHERE 
  key_id = '0992e4c9a98f96ff0e97241186b3e83ff48c486be518eedcae991c53a2e8ab4b' 
  AND (
    token = 'U5PhSUVn95oawaTTzYTuvrOvdNoTcKCisqh9x/I5uqk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024