UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'U3/xaD3zxJ6Kyaf/ipD2W/Hk/RwTQlPd7Vb5A5u1dqk=' 
WHERE 
  key_id = '13e882bca49dd53d32d1174e6e31ad70c2e42bb44fc3b6a6d8adb989b42310f0' 
  AND (
    token = 'U3/xaD3zxJ6Kyaf/ipD2W/Hk/RwTQlPd7Vb5A5u1dqk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039