UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RINHvBsAipuIHGlkUyg9VtbrvvekEr3rVbWN0NMN8GA='
WHERE
key_id = '963fa763b77ef8489fec65a4277685815be4384e59475fbf7739bcc687a6412f'
AND (
token = 'RINHvBsAipuIHGlkUyg9VtbrvvekEr3rVbWN0NMN8GA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)