UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7zsVxTu60Uzuoahqct5julZF6xqoRSPqkfKTdYd6t/Q=' 
WHERE 
  key_id = 'eba817b193d51de37a5cdfd3471ba6dbd6428ae7986465d0b30313ce577b6cb1' 
  AND (
    token = '7zsVxTu60Uzuoahqct5julZF6xqoRSPqkfKTdYd6t/Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029