UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v/1yVkmL72b2eDQD8OsoXaeQGxow/UHB8Z5N+GlkBFk='
WHERE
key_id = '2d33f81194ddca9384274596ba351a26527f88d1c3e50c4eb455f06f321396db'
AND (
token = 'v/1yVkmL72b2eDQD8OsoXaeQGxow/UHB8Z5N+GlkBFk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)