UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uHoTnmEbB35O0BS4CBXay7qN31BgnPxznIDYbvkH6Is='
WHERE
key_id = 'b26cdbd0243d561af98656572af24a3fdf84fdb26345fea651dffc8b19ee95a9'
AND (
token = 'uHoTnmEbB35O0BS4CBXay7qN31BgnPxznIDYbvkH6Is='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)