UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/5Hif7JVi+SgW3yNY/FBw1wUaT6jdR2IVdUyaIYDee8='
WHERE
key_id = '446463546223e80ff74240b450834a9e014de059bdfc1851a508aa37da2bc680'
AND (
token = '/5Hif7JVi+SgW3yNY/FBw1wUaT6jdR2IVdUyaIYDee8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)