UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uhp74rBdNL7NjVirTcNh2Lz9xHk/MVMefZEfYm/IkMI='
WHERE
key_id = '3927cbc41c4e36651f56a72afcabced1c6f12fa289901910eb74927daba4edc8'
AND (
token = 'uhp74rBdNL7NjVirTcNh2Lz9xHk/MVMefZEfYm/IkMI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)