UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mYPKhb/j+3gdOevO2O7LY3Kbevq6nOxvD5JR3AFQJhA='
WHERE
key_id = '74ffdfe8b5f546c2a977409027867ae96a6157003e9f2bb7237ae916628d4676'
AND (
token = 'mYPKhb/j+3gdOevO2O7LY3Kbevq6nOxvD5JR3AFQJhA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)