UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DcVeNX7utQFqYHNzEusygN1s/G80rXVdN0rroC7lDlE=' 
WHERE 
  key_id = '70cbb3e2d74ab0ed1d81ee186f9a16c822cf6b1ef3846f64b0e7b0961c3e4952' 
  AND (
    token = 'DcVeNX7utQFqYHNzEusygN1s/G80rXVdN0rroC7lDlE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00058