UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'k/Hkqo+YlEn/vnpB3Tc1a7wBuD3u5oIF+n2B+QDgcA0=' 
WHERE 
  key_id = '6ee552da579cf8d3891cf74d1973a3e3db57985f079680893cb8fa0ddf23e52d' 
  AND (
    token = 'k/Hkqo+YlEn/vnpB3Tc1a7wBuD3u5oIF+n2B+QDgcA0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033