UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'QQCNCCP/jhcHNRIFs0fDPDlT7rMXr3lhI9Sa8lLRl4Q=' 
WHERE 
  key_id = '3a4336d93f11e2b5b9fd6bf5d76cde82cf6750705c85d7c55a6b2c9c454c18b9' 
  AND (
    token = 'QQCNCCP/jhcHNRIFs0fDPDlT7rMXr3lhI9Sa8lLRl4Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034