UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1nWbpeeU7ycpa7zyb9STkrNz5AGvqxAby0eNdpdH33A=' 
WHERE 
  key_id = '19b00d67c04f1d0f5bd5b80eb9b02b9e8f68fa9ec8210f0ddbb07e8674b8da62' 
  AND (
    token = '1nWbpeeU7ycpa7zyb9STkrNz5AGvqxAby0eNdpdH33A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038