UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pjCNje8/yro3H9+DviRH64dqU6bnJlTu76zDG9Nf4qc=' 
WHERE 
  key_id = '57cdf661e7a0a7f50cb4c5ab1de88593ed09d1ac82c9ae05f4a04b83a7cce980' 
  AND (
    token = 'pjCNje8/yro3H9+DviRH64dqU6bnJlTu76zDG9Nf4qc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025