UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'V9X9oKzqBND/Fv2wP1zi6ozZBe/1S4MAkxG3yoAwCKQ=' 
WHERE 
  key_id = '45ee8a9b6cd53c2d40232785cc53d47f8fe1a0d1c6e652c021d99ce20ef6234b' 
  AND (
    token = 'V9X9oKzqBND/Fv2wP1zi6ozZBe/1S4MAkxG3yoAwCKQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047