UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2Hd8HsJrfm7eYm8yKmOaC13lD6QdDHTPslPJfqMTIN4='
WHERE
key_id = '2bc66cae13a3a6f7eb5a719e0bd5aa37cff8d83fc7f516e5c8b7edb822b34abb'
AND (
token = '2Hd8HsJrfm7eYm8yKmOaC13lD6QdDHTPslPJfqMTIN4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)