UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FT7wBij+QJFeiXbRmd3so3yeAw8FGMSNj4IbvgX6mU8='
WHERE
key_id = '7375a32d7e241262999cbefe711b75863ceed1c4ad62f35468438b8dc680b186'
AND (
token = 'FT7wBij+QJFeiXbRmd3so3yeAw8FGMSNj4IbvgX6mU8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)