UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vhE+W4WbyUXiUwNYagpCiyZjAkeuimkByF4I3xKLpco='
WHERE
key_id = 'f1c52f9dc7509d947cd9d465b7425b51c04bb38da14626a47b2694bc01cc1550'
AND (
token = 'vhE+W4WbyUXiUwNYagpCiyZjAkeuimkByF4I3xKLpco='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)