UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CpkCbDyao9APCcSbEqqF+3wb/YDW055fzZaQ7UWyvXU='
WHERE
key_id = '638925fc9f9c77946a7506721923f386fe6cd182adfecd2828a3db8a7c3400f0'
AND (
token = 'CpkCbDyao9APCcSbEqqF+3wb/YDW055fzZaQ7UWyvXU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)