UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'aFeXmpTtc7/knbN1wFYaiDBLPKnv4a6qRi97bYg78og=' 
WHERE 
  key_id = '1481c955066714c498a53f5a85b8a83ecdd905792cd342f2bc6ccb0fe81d6ae0' 
  AND (
    token = 'aFeXmpTtc7/knbN1wFYaiDBLPKnv4a6qRi97bYg78og=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043